<template>
  <div>
    <div class="head">
      <headers></headers>
    </div>
    <div class="body">
      <router-view></router-view>
    </div>

    <div class="footer">
      <div class="footer-body">
        <!-- 左边 -->
        <div>
          <div style="display: flex">
            <div
              style="
                display: flex;
                flex-direction: column;
                width: 170px;
                align-items: start;
              "
            >
              <div @click="$router.push('/goodsHot')" class="navbar_item_title">
                {{ $store.state.locale == "zh-cn" ? "热销产品" : "PRODUCTS" }}
              </div>
              <div class="navbar_item">
                <div
                  class="navbar_item_name"
                  @click="$router.push('/goodsHot?name=专业田径')"
                >
                  {{
                    $store.state.locale == "zh-cn" ? "专业田径" : "Professional Athletics"
                  }}
                </div>
                <div
                  class="navbar_item_name"
                  @click="$router.push('/goodsHot?name=业余路跑')"
                >
                  {{
                    $store.state.locale == "zh-cn" ? "业余路跑" : "Amateur Road Running"
                  }}
                </div>
                <div
                  class="navbar_item_name"
                  @click="$router.push('/goodsHot?name=考试体侧')"
                >
                  {{
                    $store.state.locale == "zh-cn" ? "考试体侧" : "Exam Physical Testing"
                  }}
                </div>
              </div>
            </div>
            <div
              style="
                display: flex;
                flex-direction: column;
                width: 170px;
                align-items: start;
              "
            >
              <div @click="$router.push('/brand')" class="navbar_item_title">
                {{ $store.state.locale == "zh-cn" ? "品牌故事" : "BRAND STORY" }}
              </div>
              <div class="navbar_item">
                <div
                  class="navbar_item_name"
                  @click="$router.push('/brand?name=品牌历史')"
                >
                  {{ $store.state.locale == "zh-cn" ? "品牌历史" : "Brand History" }}
                </div>
                <div
                  class="navbar_item_name"
                  @click="$router.push('/brand?name=企业文化')"
                >
                  {{ $store.state.locale == "zh-cn" ? "企业文化" : "Corporate Culture" }}
                </div>
                <div
                  class="navbar_item_name"
                  @click="$router.push('/brand?name=社会责任')"
                >
                  {{
                    $store.state.locale == "zh-cn" ? "社会责任" : "Social Responsibility"
                  }}
                </div>
              </div>
            </div>
            <div
              style="
                display: flex;
                flex-direction: column;
                width: 170px;
                align-items: start;
              "
            >
              <div @click="$router.push('/dynamic')" class="navbar_item_title">
                {{ $store.state.locale == "zh-cn" ? "多威动态" : "DYNAMICS" }}
              </div>
              <div class="navbar_item">
                <div
                  class="navbar_item_name"
                  @click="$router.push('/dynamic?name=赛事合作')"
                >
                  {{
                    $store.state.locale == "zh-cn"
                      ? "赛事合作"
                      : "Competition Cooperation"
                  }}
                </div>
                <div
                  class="navbar_item_name"
                  @click="$router.push('/dynamic?name=新闻活动')"
                >
                  {{ $store.state.locale == "zh-cn" ? "新闻活动" : "News and Events" }}
                </div>
              </div>
            </div>
            <div
              style="
                display: flex;
                flex-direction: column;

                width: 170px;
                align-items: start;
              "
            >
              <div @click="$router.push('/technology')" class="navbar_item_title">
                {{ $store.state.locale == "zh-cn" ? "多威科技" : "TECHNOLOGY" }}
              </div>
              <div class="navbar_item">
                <div
                  class="navbar_item_name"
                  @click="$router.push('/technology?name=资质荣誉')"
                >
                  {{
                    $store.state.locale == "zh-cn"
                      ? "资质荣誉"
                      : "Qualification and Honor"
                  }}
                </div>
              </div>
            </div>
            <div
              style="
                display: flex;
                flex-direction: column;

                width: 170px;
                align-items: start;
              "
            >
              <div @click="$router.push('/about')" class="navbar_item_title">
                {{ $store.state.locale == "zh-cn" ? "联系我们" : "CONTACT" }}
              </div>
              <div class="navbar_item">
                <div
                  class="navbar_item_name"
                  @click="$router.push('/about?name=门店地址')"
                >
                  {{ $store.state.locale == "zh-cn" ? "门店地址" : "Store Address" }}
                </div>
                <div
                  class="navbar_item_name"
                  @click="$router.push('/about?name=售后联系')"
                >
                  {{
                    $store.state.locale == "zh-cn" ? "售后联系" : "After Sales Contact"
                  }}
                </div>
                <div
                  class="navbar_item_name"
                  @click="$router.push('/about?name=意见反馈')"
                >
                  {{
                    $store.state.locale == "zh-cn" ? "意见反馈" : "Feedback on Opinions"
                  }}
                </div>
                <div
                  class="navbar_item_name"
                  @click="$router.push('/about?name=社交媒体')"
                >
                  {{ $store.state.locale == "zh-cn" ? "社交媒体" : "Social Media" }}
                </div>
              </div>
            </div>
          </div>
          <div style="display: flex; margin-top: 20px">
            <div
              style="font-weight: bold; font-size: 15px; color: #bebebe; margin-top: 6px"
            >
              {{
                $store.state.locale == "zh-cn" ? "品牌官方媒体" : "Brand Official Media"
              }}
            </div>
            <div style="margin-left: 40px; display: flex; justify-content: center">
              <div
                @mouseenter="mouseenter1(item)"
                @mouseleave="mouseleave1(item)"
                style="
                  display: flex;
                  justify-content: center;
                  align-items: center;
                  flex-direction: column;
                  width: 100px;
                  cursor: pointer;
                  position: relative;
                "
                v-for="item in mediumData"
                :key="item.id"
                @click="pushUrl(item)"
              >
                <div>
                  <img :src="item.icon" style="width: 30px; height: 30px" alt="" />
                </div>
                <div style="margin-top: 6px; color: #888888; font-size: 12px">
                  {{ item.name }}
                  <!-- {{ $store.state.locale == "zh-cn" ? "微信公众号" : "WeChat" }} -->
                </div>
                <div
                  v-if="item.show && item.image"
                  style="
                    width: 100px;
                    height: 100px;
                    position: absolute;
                    bottom: 70px;
                    background-color: white;
                  "
                >
                  <img :src="item.image" style="width: 100px; height: 100px" alt="" />
                </div>
              </div>

              <!-- <div
                style="
                  display: flex;
                  justify-content: center;
                  align-items: center;
                  flex-direction: column;
                  cursor: pointer;
                  width: 100px;
                "
              >
                <div>
                  <img
                    src="@/assets/img/wb.png"
                    style="width: 30px; height: 30px"
                    alt=""
                  />
                </div>
                <div style="margin-top: 6px; color: #888888; font-size: 12px">
                  {{ $store.state.locale == "zh-cn" ? "新浪微博" : "Sina Weibo" }}
                </div>
              </div>
              <div
                style="
                  display: flex;
                  justify-content: center;
                  align-items: center;
                  flex-direction: column;
                  cursor: pointer;
                  width: 100px;
                "
              >
                <div>
                  <img
                    src="@/assets/img/xhs.png"
                    style="width: 30px; height: 30px"
                    alt=""
                  />
                </div>
                <div style="margin-top: 6px; color: #888888; font-size: 12px">
                  {{ $store.state.locale == "zh-cn" ? "小红书" : "Little Red Book" }}
                </div>
              </div>
              <div
                style="
                  display: flex;
                  justify-content: center;
                  align-items: center;
                  flex-direction: column;
                  width: 100px;
                  cursor: pointer;
                "
              >
                <div>
                  <img
                    src="@/assets/img/bili.png"
                    style="width: 30px; height: 30px"
                    alt=""
                  />
                </div>
                <div style="margin-top: 6px; color: #888888; font-size: 12px">
                  {{ $store.state.locale == "zh-cn" ? "bilibili视频" : "Bilibili " }}
                </div>
              </div>
              <div
                style="
                  display: flex;
                  justify-content: center;
                  align-items: center;
                  flex-direction: column;
                  cursor: pointer;
                  width: 100px;
                "
              >
                <div>
                  <img
                    src="@/assets/img/dy.png"
                    style="width: 30px; height: 30px"
                    alt=""
                  />
                </div>
                <div style="margin-top: 6px; color: #888888; font-size: 12px">
                  {{ $store.state.locale == "zh-cn" ? "抖音" : "Tiktok " }}
                </div>
              </div>
              <div
                style="
                  display: flex;
                  justify-content: center;
                  align-items: center;
                  flex-direction: column;
                  cursor: pointer;
                  width: 100px;
                "
              >
                <div>
                  <img
                    src="@/assets/img/sph.png"
                    style="width: 30px; height: 30px"
                    alt=""
                  />
                </div>
                <div style="margin-top: 6px; color: #888888; font-size: 12px">
                  {{ $store.state.locale == "zh-cn" ? "视频号" : "Channels " }}
                </div>
              </div> -->
            </div>
          </div>

          <!-- <div style="margin-top: 20px; display: flex; justify-content: center">
            <div
              style="
                display: flex;
                justify-content: center;
                align-items: center;
                flex-direction: column;
                width: 100px;
              "
            >
              <div>
                <img
                  src="@/assets/img/bili.png"
                  style="width: 30px; height: 30px"
                  alt=""
                />
              </div>
              <div style="margin-top: 6px; color: #888888; font-size: 12px">
                {{ $store.state.locale == "zh-cn" ? "bilibili视频" : "Bilibili " }}
              </div>
            </div>
            <div
              style="
                display: flex;
                justify-content: center;
                align-items: center;
                flex-direction: column;

                width: 100px;
              "
            >
              <div>
                <img src="@/assets/img/dy.png" style="width: 30px; height: 30px" alt="" />
              </div>
              <div style="margin-top: 6px; color: #888888; font-size: 12px">
                {{ $store.state.locale == "zh-cn" ? "抖音" : "Tiktok " }}
              </div>
            </div>
            <div
              style="
                display: flex;
                justify-content: center;
                align-items: center;
                flex-direction: column;

                width: 100px;
              "
            >
              <div>
                <img
                  src="@/assets/img/sph.png"
                  style="width: 30px; height: 30px"
                  alt=""
                />
              </div>
              <div style="margin-top: 6px; color: #888888; font-size: 12px">
                {{ $store.state.locale == "zh-cn" ? "视频号" : "Channels " }}
              </div>
            </div>
          </div> -->
          <!-- <div style="margin-top: 20px; display: flex; flex-direction: column">
            <div style="display: flex; align-items: center">
              <div style="font-weight: bold; font-size: 15px; color: #bebebe">
                {{
                  $store.state.locale == "zh-cn"
                    ? "售后联系方式："
                    : "After Sales Contact"
                }}
              </div>
              <div style="color: #bebebe; font-size: 18px; margin-left: 30px">
                {{ info.hotline }}
              </div>
              <div style="color: #bebebe; font-size: 14px">
              
                （ {{ info.openhours }} ）
              </div>
            </div>
            <div style="display: flex; align-items: center; margin-top: 20px">
              <div style="font-weight: bold; font-size: 15px; color: #bebebe">
                {{
                  $store.state.locale == "zh-cn"
                    ? "合作及建议反馈："
                    : "Collaboration and Feedback on Suggestions"
                }}
              </div>
              <div style="color: #bebebe; font-size: 18px; margin-left: 15px">
                {{ info.email }}
              </div>
            </div>
          </div> -->
        </div>
        <!-- 右边 -->
        <div style="display: flex; flex-direction: column; align-items: center">
          <div style="font-weight: bold; font-size: 15px; color: #bebebe">
            {{
              $store.state.locale == "zh-cn" ? "防伪查询" : "Anti-Counterfeiting Query "
            }}
          </div>
          <div style="margin-top: 20px" class="top">
            <el-input
              :placeholder="
                $store.state.locale == 'zh-cn'
                  ? '请输入防伪号码'
                  : 'Enter the security number'
              "
              class="footer-input"
              v-model="value"
              prefix-icon="el-icon-search"
            >
              <template slot="suffix">
                <div @click="validate()" class="footer-input-btn">
                  {{ $store.state.locale == "zh-cn" ? "查询" : "Query" }}
                </div>
              </template>
            </el-input>
          </div>
          <div style="margin-top: 30px; display: flex; flex-direction: column">
            <div style="display: flex">
              <div style="font-weight: bold; font-size: 14px; color: #bebebe">
                {{
                  $store.state.locale == "zh-cn"
                    ? "售后联系方式："
                    : "After Sales Contact :"
                }}
              </div>
              <div style="margin-left: 30px">
                <div style="color: #bebebe; font-size: 18px">
                  {{ info.hotline }}
                </div>
                <div style="color: #bebebe; font-size: 14px; margin-top: 15px">
                  ( {{ info.openhours }} )
                </div>
              </div>
            </div>
            <div style="display: flex; align-items: center; margin-top: 20px">
              <div style="font-weight: bold; font-size: 14px; color: #bebebe">
                {{
                  $store.state.locale == "zh-cn"
                    ? "合作及建议反馈："
                    : "Collaboration and Feedback :"
                }}
              </div>
              <div style="color: #bebebe; font-size: 18px; margin-left: 15px">
                {{ info.email }}
              </div>
            </div>
          </div>
          <!-- <div
            style="margin-top: 20px; font-weight: bold; font-size: 15px; color: #bebebe"
          >
            {{ $store.state.locale == "zh-cn" ? "品牌官方媒体" : "Brand Official Media" }}
          </div>
          <div style="margin-top: 20px; display: flex; justify-content: center">
            <div
              style="
                display: flex;
                justify-content: center;
                align-items: center;
                flex-direction: column;
                width: 100px;
              "
            >
              <div>
                <img src="@/assets/img/wx.png" style="width: 30px; height: 30px" alt="" />
              </div>
              <div style="margin-top: 6px; color: #888888; font-size: 12px">
                {{ $store.state.locale == "zh-cn" ? "微信公众号" : "WeChat" }}
              </div>
            </div>
            <div
              style="
                display: flex;
                justify-content: center;
                align-items: center;
                flex-direction: column;

                width: 100px;
              "
            >
              <div>
                <img src="@/assets/img/wb.png" style="width: 30px; height: 30px" alt="" />
              </div>
              <div style="margin-top: 6px; color: #888888; font-size: 12px">
                {{ $store.state.locale == "zh-cn" ? "新浪微博" : "Sina Weibo" }}
              </div>
            </div>
            <div
              style="
                display: flex;
                justify-content: center;
                align-items: center;
                flex-direction: column;

                width: 100px;
              "
            >
              <div>
                <img
                  src="@/assets/img/xhs.png"
                  style="width: 30px; height: 30px"
                  alt=""
                />
              </div>
              <div style="margin-top: 6px; color: #888888; font-size: 12px">
                {{ $store.state.locale == "zh-cn" ? "小红书" : "Little Red Book" }}
              </div>
            </div>
          </div>
          <div style="margin-top: 20px; display: flex; justify-content: center">
            <div
              style="
                display: flex;
                justify-content: center;
                align-items: center;
                flex-direction: column;
                width: 100px;
              "
            >
              <div>
                <img
                  src="@/assets/img/bili.png"
                  style="width: 30px; height: 30px"
                  alt=""
                />
              </div>
              <div style="margin-top: 6px; color: #888888; font-size: 12px">
                {{ $store.state.locale == "zh-cn" ? "bilibili视频" : "Bilibili " }}
              </div>
            </div>
            <div
              style="
                display: flex;
                justify-content: center;
                align-items: center;
                flex-direction: column;

                width: 100px;
              "
            >
              <div>
                <img src="@/assets/img/dy.png" style="width: 30px; height: 30px" alt="" />
              </div>
              <div style="margin-top: 6px; color: #888888; font-size: 12px">
                {{ $store.state.locale == "zh-cn" ? "抖音" : "Tiktok " }}
              </div>
            </div>
            <div
              style="
                display: flex;
                justify-content: center;
                align-items: center;
                flex-direction: column;

                width: 100px;
              "
            >
              <div>
                <img
                  src="@/assets/img/sph.png"
                  style="width: 30px; height: 30px"
                  alt=""
                />
              </div>
              <div style="margin-top: 6px; color: #888888; font-size: 12px">
                {{ $store.state.locale == "zh-cn" ? "视频号" : "Channels " }}
              </div>
            </div>
          </div> -->
        </div>
      </div>
    </div>
    <div class="footer-foot" @click="toBeiAn">
      <div class="footer-foot-body" style="margin: auto; width: 1440px">
        <div>{{ info.copyright }}</div>
        <div style="margin-left: 5px">江苏多威体育用品有限公司</div>

        <div class="footer-foot-c">{{ info.ministry_beian }}</div>

        <img
          src="https://jy-shops.oss-cn-beijing.aliyuncs.com/0dwgw/logo%403x.png"
          class="footer-foot-b"
        />
        <div>{{ info.public_beian }}</div>
      </div>
    </div>
    <el-dialog
      title="问题反馈"
      :visible.sync="dialogVisible"
      width="600px"
      :append-to-body="true"
    >
      <el-form label-position="top">
        <el-form-item label="吐槽问题">
          <el-input
            v-model="form.question"
            type="textarea"
            placeholder="我想说..."
            style="background-color: #f9f9f9"
            :rows="6"
            resize="none"
          ></el-input>
        </el-form-item>
        <el-form-item label="我的期望">
          <el-input
            v-model="form.expectation"
            type="textarea"
            placeholder="我想说..."
            :rows="6"
            resize="none"
          ></el-input>
        </el-form-item>
        <el-form-item>
          <div class="fade-btn-box">
            <div class="fade-btn" @click="dialogVisible = false">取消</div>
            <div class="fade-btn fade-btn-t" @click="submitFade">确定</div>
          </div>
        </el-form-item>
      </el-form>
    </el-dialog>
    <div style="position: fixed; bottom: 60px; right: 50px; z-index: 99">
      <div
        @click="back"
        style="
          width: 60px;
          padding: 30px 0;
          background-color: rgba(0, 0, 0, 0.5);
          border-radius: 40px;
          display: flex;
          justify-content: center;
          align-items: center;
          flex-direction: column;
          cursor: pointer;
        "
      >
        <img src="@/assets/img/back.png" style="width: 24px; height: 24px" alt="" />
        <div style="color: white; font-size: 11px; margin-top: 10px">返回顶部</div>
      </div>
    </div>
  </div>
</template>

<script>
import { switchLocale } from "./store/global";
import headers from "@/components/head.vue";
export default {
  components: {
    headers,
  },
  data() {
    return {
      headFlag: 0, //1是热销商品 2是品牌故事 3是多威动态 4是多威科技 5是联系我们
      flag: false,
      footer: [
        {
          icon: "https://jy-shops.oss-cn-beijing.aliyuncs.com/0dwgw/index/cac1.png",
          iconSelect:
            "https://jy-shops.oss-cn-beijing.aliyuncs.com/0dwgw/index/cac1-1.png",
          name: "官方微信",
        },
        {
          icon: "https://jy-shops.oss-cn-beijing.aliyuncs.com/0dwgw/index/cac2.png",
          iconSelect:
            "https://jy-shops.oss-cn-beijing.aliyuncs.com/0dwgw/index/cac2-1.png",
          name: "新浪微博",
        },
        {
          icon: "https://jy-shops.oss-cn-beijing.aliyuncs.com/0dwgw/index/cac3.png",
          iconSelect:
            "https://jy-shops.oss-cn-beijing.aliyuncs.com/0dwgw/index/cac3-1.png",
          name: "天猫商城",
        },
        {
          icon: "https://jy-shops.oss-cn-beijing.aliyuncs.com/0dwgw/index/cac4.png",
          iconSelect:
            "https://jy-shops.oss-cn-beijing.aliyuncs.com/0dwgw/index/cac4-1.png",
          name: "京东商城",
        },
      ],
      footer_index: -1,
      value: "",
      info: {},
      show_gzh: false,
      dialogVisible: false,
      form: {
        question: "",
        expectation: "",
      },
      is_hover: false,
      is_hovers: false,
      timer: "",
      classify: [],
      links: [
        {
          name: "首页",
          link: "/index",
        },
        {
          name: "产品中心",
          link: "/product",
        },
        {
          name: "品牌文化",
          link: "/brand",
        },
        {
          name: "多威科技",
          link: "/dw",
        },
        {
          name: "关于我们",
          link: "/about",
        },
      ],
      urls: "",
      text: "",
      textimg: "",

      list2: [
        {
          name: "bilibili视频",
          img: "/src/assets/img/bili.png",
        },
        {
          name: "抖音",
          img: "/src/assets/img/dy.png",
        },
        {
          name: "视频号",
          img: "/src/assets/img/sph.png",
        },
      ],
      footerInfo: {},
      mediumData: [], //底部媒体数据
    };
  },
  created() {
    window.addEventListener("resize", this.handleResize);
    this.handleResize(); // 初始化时也执行一次
  },
  destroyed() {
    window.removeEventListener("resize", this.handleResize);
  },
  mounted() {
    if (this._isMobile()) {
      return window.open("https://dowin.secosoft.cn/h5", "_self");
    }
    switchLocale.call(
      this,
      localStorage.getItem("language") ? localStorage.getItem("language") : "zh-cn"
    );
    this.getConfig();
    // this.getClassify();
    this.urls = this.$route.path;
    this.getMedium();

    // this.getText();
  },
  computed: {
    language() {
      return this.$store.state.locale;
    },
  },
  methods: {
    back() {
      let top = document.documentElement.scrollTop || document.body.scrollTop;
      // 实现滚动效果
      const timeTop = setInterval(() => {
        document.body.scrollTop = document.documentElement.scrollTop = top -= 100;
        if (top <= 0) {
          clearInterval(timeTop);
        }
      }, 10);
      // document.documentElement.scrollTop = 0;
    },
    pushUrl(item) {
      if (item.url) {
        window.open(item.url);
      }
    },
    mouseenter1(item) {
      item.show = true;

      this.$forceUpdate();
    },
    mouseleave1(item) {
      item.show = false;
      this.$forceUpdate();
    },
    getMedium() {
      this.ajaxs("index/medium?translate=" + this.language, {
        success: (res) => {
          console.log(res);
          this.mediumData = res.data;
          for (let i = 0; i < this.mediumData.length; i++) {
            this.mediumData[i].show = false;
          }
          console.log(this.mediumData);
        },
      });
    },
    navbarPush(name) {
      this.$router.push("/goodsHot?name=" + name);
    },
    logo() {
      this.$router.push("/index");
    },
    //鼠标移入
    mouseenter() {
      this.flag = true;
    },
    //鼠标移除
    mouseleave() {
      this.flag = false;
    },
    commandClick(val) {
      if (val == 0) {
        switchLocale.call(this, "zh-cn");
        localStorage.setItem("language", "zh-cn");
      } else {
        switchLocale.call(this, "en");
        localStorage.setItem("language", "en");
      }
    },
    getText() {
      this.ajaxs("Index/textInfo", {
        data: {
          id: 1,
        },
        success: (res) => {
          this.text = res.data.content;
          this.textimg = res.data.image;
        },
      });
    },
    toPage(page) {
      this.$router.push({
        path: page,
      });
    },
    toxinwen(index) {
      this.$router.push({
        path: "/enterprise?index=" + index,
      });
    },
    toPin(index) {
      this.$router.push({
        path: "/brand?index=" + index,
      });
    },
    changeClassify(id) {
      this.$router.push({
        path: "/product?id=" + id,
      });
    },
    getClassify() {
      this.ajaxs("Category/index", {
        success: (res) => {
          this.classify = res.data;
        },
      });
    },
    openProduct() {
      console.log(this.$children);
    },
    toTop() {
      clearInterval(this.timer);
      var top = document.documentElement.scrollTop || document.body.scrollTop;
      this.timer = setInterval(() => {
        top = top - 20;
        document.documentElement.scrollTop = top;
        if (top <= 0) clearInterval(this.timer);
      }, 10);
    },
    submitFade() {
      this.ajaxs("Index/feedback", {
        data: this.form,
        success: (res) => {
          this.toast(res.code, res.msg);
          if (res.code) this.dialogVisible = false;
        },
      });
    },
    fade() {
      this.form = {
        question: "",
        expectation: "",
      };
      this.dialogVisible = true;
    },
    clickConcat(index) {
      switch (index) {
        case 0:
          break;
        case 1:
          window.open(this.info.weibo);
          break;
        case 2:
          this.tongji("tmall");
          window.open(this.info.tamll);
          break;
        case 3:
          this.tongji("jingdong");
          window.open(this.info.jingdong);
          break;
      }
    },
    tongji(type) {
      this.ajaxs("Index/access", {
        data: {
          type: type,
        },
        success: (res) => {
          console.log(res);
        },
      });
    },
    getConfig() {
      this.ajaxs("Common/config?translate=" + this.language, {
        success: (res) => {
          this.info = res.data;
          localStorage.setItem("config", JSON.stringify(res.data));
        },
      });
    },
    mouseFotter(index) {
      if (index == 0) {
        this.show_gzh = true;
      }
      this.footer_index = index;
    },
    leaverFooter(index) {
      if (index == 0) {
        this.show_gzh = false;
      }
      this.footer_index = -1;
    },
    validate() {
      var fwCode = this.value;

      var antiFakeCodeReg = /^\d{20}$|^\d{21}$|^\d{22}$/;

      if (fwCode == "") {
        alert("请输入防伪码!");

        return true;
      }

      if (!antiFakeCodeReg.test(fwCode)) {
        alert("请输入正确的防伪码！");

        return true;
      }

      var par = "https://antifake.jgwcjm.com?Code=" + fwCode;

      window.open(par);

      return true;
    },
    handleResize() {
      const mobileWidth = 768; // 设置手机屏幕的宽度阈值
      if (window.innerWidth < mobileWidth) {
        // 如果宽度小于阈值，进行页面跳转或其他操作
        window.open("https://dowin.secosoft.cn/h5", "_self");
      }
    },
    _isMobile() {
      let flag = navigator.userAgent.match(
        /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
      );
      return flag;
    },

    toBeiAn() {
      window.open("https://beian.miit.gov.cn/");
    },
  },
  watch: {
    $route() {
      this.urls = this.$route.path;
    },
  },
  computed: {
    language() {
      return this.$store.state.locale;
    },
  },
};
</script>

<style>
.language_body {
  margin-left: 30px;
  cursor: pointer;
}
.head-menu-title-active {
  font-weight: bold;
  border-bottom: 3px solid rgb(201, 29, 29);
}

.head-menu-item-default {
  color: #666666;
}
.top .el-input__inner {
  background-color: #4c4c4c;
  border: 1px solid #bebebe;
  height: 34px !important;
}
.top .el-input__suffix {
  /* right: 4px;
  top: 4px; */
  right: 0;
  border-radius: 6px;
  color: white;
}
.top .el-input__inner {
  color: white;
}
.top .el-input__icon {
  line-height: 34px;
}
.navbar_item {
  color: #797979;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: start;
}
.navbar_item_name {
  margin-bottom: 12px;
  cursor: pointer;
  color: #999999;
}
.navbar_item_title {
  font-size: 15px;
  color: #bebebe;
  font-weight: bold;
  margin-bottom: 18px;
  cursor: pointer;
}
@import url("./assets/css/app.css");
@import url("./assets/css/com.css");
</style>
